package dao;

import pojo.Label;
import pojo.NoteLabels;

import java.sql.SQLException;
import java.util.ArrayList;

public interface NoteLabelsDao {
    /**
     * 笔记添加标签
     *
     * @param noteLabels
     * @return
     * @throws SQLException
     */
    boolean addNoteLabels(NoteLabels noteLabels) throws SQLException;

    /**
     * 某笔记的所有标签
     *
     * @param nid
     * @return
     * @throws SQLException
     * @throws ClassNotFoundException
     */
    ArrayList<NoteLabels> noteLabelsList(int nid) throws SQLException, ClassNotFoundException;

    /**
     * 获取某个模糊搜索的标签的所有NoteLabels对象
     *
     * @param lid
     * @return
     * @throws SQLException
     * @throws ClassNotFoundException
     */
    ArrayList<NoteLabels> findNoteLabelsByLid(int lid) throws SQLException, ClassNotFoundException;

    /**
     * 获取所有模糊搜索的标签的所有NoteLabels对象
     *
     * @param searchLabels
     * @return
     * @throws SQLException
     * @throws ClassNotFoundException
     */
    ArrayList<NoteLabels> searchNoteLabels(ArrayList<Label> searchLabels) throws SQLException, ClassNotFoundException;
}
